Optimal. Leaf size=33 \[ -\frac{\cot (c+d x) \sqrt{-a \tan ^2(c+d x)} \log (\cos (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0300599, antiderivative size = 33, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.176, Rules used = {4121, 3658, 3475} \[ -\frac{\cot (c+d x) \sqrt{-a \tan ^2(c+d x)} \log (\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4121
Rule 3658
Rule 3475
Rubi steps
\begin{align*} \int \sqrt{a-a \sec ^2(c+d x)} \, dx &=\int \sqrt{-a \tan ^2(c+d x)} \, dx\\ &=\left (\cot (c+d x) \sqrt{-a \tan ^2(c+d x)}\right ) \int \tan (c+d x) \, dx\\ &=-\frac{\cot (c+d x) \log (\cos (c+d x)) \sqrt{-a \tan ^2(c+d x)}}{d}\\ \end{align*}
Mathematica [A] time = 0.0368466, size = 33, normalized size = 1. \[ -\frac{\cot (c+d x) \sqrt{-a \tan ^2(c+d x)} \log (\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.347, size = 108, normalized size = 3.3 \begin{align*} -{\frac{\cos \left ( dx+c \right ) }{d\sin \left ( dx+c \right ) } \left ( -\ln \left ( 2\, \left ( \cos \left ( dx+c \right ) +1 \right ) ^{-1} \right ) +\ln \left ({\frac{1-\cos \left ( dx+c \right ) +\sin \left ( dx+c \right ) }{\sin \left ( dx+c \right ) }} \right ) +\ln \left ( -{\frac{-1+\cos \left ( dx+c \right ) +\sin \left ( dx+c \right ) }{\sin \left ( dx+c \right ) }} \right ) \right ) \sqrt{-{\frac{a \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{ \left ( \cos \left ( dx+c \right ) \right ) ^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.46501, size = 28, normalized size = 0.85 \begin{align*} \frac{\sqrt{-a} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.50536, size = 128, normalized size = 3.88 \begin{align*} -\frac{\sqrt{\frac{a \cos \left (d x + c\right )^{2} - a}{\cos \left (d x + c\right )^{2}}} \cos \left (d x + c\right ) \log \left (-\cos \left (d x + c\right )\right )}{d \sin \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{- a \sec ^{2}{\left (c + d x \right )} + a}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.49128, size = 190, normalized size = 5.76 \begin{align*} -\frac{{\left (\log \left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right ) \mathrm{sgn}\left (-\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right ) - \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) \mathrm{sgn}\left (-\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right ) - \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) \mathrm{sgn}\left (-\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )\right )} \sqrt{-a} \mathrm{sgn}\left (\cos \left (d x + c\right )\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]